home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / libx11.lha / libX11 / lists.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-22  |  1.6 KB  |  52 lines

  1. /* Copyright (c) 1996 by Terje Pedersen.  All Rights Reserved   */
  2. /*                                                              */
  3. /* By using this code you will agree to these terms:            */
  4. /*                                                              */
  5. /* 1. You may not use this code for profit in any way or form   */
  6. /*    unless an agreement with the author has been reached.     */
  7. /*                                                              */
  8. /* 2. The author is not responsible for any damages caused by   */
  9. /*    the use of this code.                                     */
  10. /*                                                              */
  11. /* 3. All modifications are to be released to the public.       */
  12. /*                                                              */
  13. /* Thats it! Have fun!                                          */
  14. /* TP                                                           */
  15. /*                                                              */
  16.  
  17. /***
  18.    NAME
  19.      lists
  20.    PURPOSE
  21.      
  22.    NOTES
  23.      
  24.    HISTORY
  25.      Terje Pedersen - Feb 15, 1996: Created.
  26. ***/
  27.  
  28. #ifndef LISTS
  29. #define LISTS
  30.  
  31. typedef struct node {
  32.   void *pData;
  33.   struct node *pNext;
  34. } ListNode_t;
  35.  
  36. typedef struct list {
  37.   struct node *pFirst;
  38.   struct node *pLast;
  39. } List_t;
  40.  
  41.  
  42. void List_FreeList(ListNode_t *pNode);
  43. void List_AddEntry(ListNode_t *pNode,void *pData);
  44. void List_AddLast(ListNode_t *pNode,void *pData);
  45. void List_RemoveEntry(ListNode_t *pNode,void *pData);
  46. void List_RemoveNode(ListNode_t *pNode,void *pData);
  47. ListNode_t *List_MakeNull(void);
  48. ListNode_t *List_NewNode(void);
  49. void List_GetNext(ListNode_t **pNode);
  50.  
  51. #endif /* LISTS */
  52.